-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: app sounds #31055
feat: app sounds #31055
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
@lauridskern can you please comment signing the CLA as instructed? i will try to rerun the job |
I have read the CLA Document and I hereby sign the CLA |
recheck |
@lauridskern CLA passing now, thanks! |
Awesome! Thanks for your assistance |
c4c87c3
to
594d0c8
Compare
@shawnborton @aimane-chnaif One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Hmm, QR build seems to be failed @lauridskern please fix conflict |
@shawnborton @thesahindia @ One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@aimane-chnaif can you please review this? I added puller bear and it also assigned @thesahindia - whoever can prioritize this, please help us get this merged. Thanks! |
yes, was waiting for conflict to be fixed. 4.7k commits are behind |
Hi there, can we please try to move this one forward? |
@lauridskern bump for fixing conflict |
@cristipaval yes, you are right - for now I think we want this feature to keep it as simple as possible, so we didn't involve BE yet
Yes, sure, I can create constants - I'll push a new commit soon 👍 |
Yes, all resolved 😊 |
Agree that this particular preference wouldn't be device specific, given that when you mute a channel you mute it everywhere and not just your local device. |
@shawnborton this PR persists the settings locally on the device only. We need backend support to persist the setting for the account accros different devices. We can merge this one as it is and open a follow-up PR to save the setting on the backend, given that it's been open for a while already. What do you think? |
Ah, I was mostly thinking that we already save a user's preference for muting rooms across devices, right? So we could just use that to inform whether or not sounds should play if the user has sounds enabled but the room is muted. Otherwise I think it's fine that we use local preferences for sound given that you might want sound on your desktop app but not mobile for instance. |
yes, this is already in place.
alright, yes, it makes sense 👍 Thanks! |
Ok, so this is good to merge once you create constants @kirillzyusko |
@cristipaval done 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
DANG! it has conflicts. Could you please resolve them, @kirillzyusko 🙏 |
@cristipaval sure, I'm on it 👀 |
…imation-and-sound
@cristipaval merged upstream 👍 |
I think you mean @cristipaval :) |
@shawnborton you are absolutely right, @christianwen sorry for disturbing you 😅 @cristipaval can we merge this PR? 👀 |
Merged 🚀 Thanks for the work here! 🙏 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.41-12 🚀
|
}); | ||
|
||
function playSoundForMessageType(pushJSON: OnyxServerUpdate[]) { | ||
const reportActionsOnly = pushJSON.filter((update) => update.key.includes('reportActions_')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's case of key
not existing in update
, which lead to #36632.
i.e. CloseAccount pusher event
FYI, We need to use browser caching to resolve offline sound playback. Issue: #47148 |
Details
This PR implements sounds playing when message gets received (only when app is in foreground, i. e. not sounds for push notifications).
To play a sound I used
react-native-sound
( andreact-native-web-sound
for web, underhood it useshowler.js
). Initially I wanted to useexpo-sound
but was getting ridiculous errors and couldn't resolve them (on iOS and web).Fixed Issues
$ #29835
PROPOSAL: N/A
Tests
@here
also should produce the sound);Offline tests
QA Steps
@here
also should produce the sound);PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-demo-sound-truncated.mp4
Android: mWeb Chrome
iOS: Native
iOS-sound-demo.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
web-sound-demo.mov
MacOS: Desktop
desktop-demo-sounds.mov